import wanSdk from './src/wanSdk';
import commons from './src/commons/commons';

const app = new wanSdk()

function init(params, cb) {
    let now = commons.formatDate(new Date(), 'YmdHis.u')
    console.log('[SDK DEBUG]['+now+']', '调用init', JSON.stringify(params))
    app.init(params, cb)
}

function login(params, cb) {
    app.printDebug('调用login', params)
    app.login(params, cb)
}

function payCreate(params, cb) {
    app.printDebug('调用payCreate', params)
    app.payCreate(params, cb)
}

function roleReg(params, cb) {
    app.printDebug('调用roleReg', params)
    app.roleReg(params, cb)
}

function roleLogin(params, cb) {
    app.printDebug('调用roleLogin', params)
    app.roleLogin(params, cb)
}

function roleEvent(params, cb) {
    app.printDebug('调用roleEvent', params)
    app.roleEvent(params, cb)
}

function adviewLoad(params, cb) {
    app.printDebug('调用adviewLoad', params)
    app.adviewLoad(params, cb)
}

function adviewShow(params, cb) {
    app.printDebug('调用adviewShow', params)
    app.adviewShow(params, cb)
}

export default {
    init,
    login,
    payCreate,
    roleReg,
    roleLogin,
    roleEvent,
    adviewLoad,
    adviewShow
}
